/**
 * 
 */
package view;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;

import model.Constant;


/**
 * @author heroandtn3
 * @date Nov 8, 2012
 */
public class AboutPanel extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static final String KEY ="AboutPanel";
	private MainPanel mainPanel;
	private JLabel lbBack;
	private JLabel lbImg;

	/**
	 * 
	 */
	public AboutPanel(MainPanel mainPanel) {
		// TODO Auto-generated constructor stub
		this.mainPanel = mainPanel;
		initGUI();
	}
	
	private void initGUI() {
		try {
			{
				this.setBackground(new java.awt.Color(0,138,0));
				this.setPreferredSize(new java.awt.Dimension(900, 680));
				this.setLayout(null);
				{
					lbBack = new MyLabelButton(Constant.BUTTON_DIR + "back", "Back to home", false);
					this.add(lbBack);
					lbBack.setBounds(426, 600, 48, 48);
					lbBack.addMouseListener(new MouseAdapter() {
						public void mouseClicked(MouseEvent evt) {
							//TODO add your code for lbBack.mouseClicked
							mainPanel.switchPanel(HomePanel.KEY);
						}
					});
				}
				{
					lbImg = new JLabel(new ImageIcon(Constant.BG_DIR + "about.png"));
					this.add(lbImg);
					lbImg.setBounds(156, 123, 587, 434);
				}
			}
		} catch(Exception e) {
			e.printStackTrace();
		}
	}

}
